
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.web_perf.metrics.rendering_stats</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.web_perf.html"><font color="#ffffff">web_perf</font></a>.<a href="telemetry.web_perf.metrics.html"><font color="#ffffff">metrics</font></a>.rendering_stats</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/web_perf/metrics/rendering_stats.py">telemetry/web_perf/metrics/rendering_stats.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="itertools.html">itertools</a><br>
</td><td width="25%" valign=top><a href="telemetry.web_perf.metrics.rendering_frame.html">telemetry.web_perf.metrics.rendering_frame</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.web_perf.metrics.rendering_stats.html#RenderingStats">RenderingStats</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="RenderingStats">class <strong>RenderingStats</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RenderingStats-__init__"><strong>__init__</strong></a>(self, renderer_process, browser_process, surface_flinger_process, timeline_ranges)</dt><dd><tt>Utility&nbsp;class&nbsp;for&nbsp;extracting&nbsp;rendering&nbsp;statistics&nbsp;from&nbsp;the&nbsp;timeline&nbsp;(or<br>
other&nbsp;loggin&nbsp;facilities),&nbsp;and&nbsp;providing&nbsp;them&nbsp;in&nbsp;a&nbsp;common&nbsp;format&nbsp;to&nbsp;classes<br>
that&nbsp;compute&nbsp;benchmark&nbsp;metrics&nbsp;from&nbsp;this&nbsp;data.<br>
&nbsp;<br>
Stats&nbsp;are&nbsp;lists&nbsp;of&nbsp;lists&nbsp;of&nbsp;numbers.&nbsp;The&nbsp;outer&nbsp;list&nbsp;stores&nbsp;one&nbsp;list&nbsp;per<br>
timeline&nbsp;range.<br>
&nbsp;<br>
All&nbsp;*_time&nbsp;values&nbsp;are&nbsp;measured&nbsp;in&nbsp;milliseconds.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-ComputeEventLatencies"><strong>ComputeEventLatencies</strong></a>(input_events)</dt><dd><tt>Compute&nbsp;input&nbsp;event&nbsp;latencies.<br>
&nbsp;<br>
Input&nbsp;event&nbsp;latency&nbsp;is&nbsp;the&nbsp;time&nbsp;from&nbsp;when&nbsp;the&nbsp;input&nbsp;event&nbsp;is&nbsp;created&nbsp;to<br>
when&nbsp;its&nbsp;resulted&nbsp;page&nbsp;is&nbsp;swap&nbsp;buffered.<br>
Input&nbsp;event&nbsp;on&nbsp;differnt&nbsp;platforms&nbsp;uses&nbsp;different&nbsp;LatencyInfo&nbsp;component&nbsp;to<br>
record&nbsp;its&nbsp;creation&nbsp;timestamp.&nbsp;We&nbsp;go&nbsp;through&nbsp;the&nbsp;following&nbsp;component&nbsp;list<br>
to&nbsp;find&nbsp;the&nbsp;creation&nbsp;timestamp:<br>
1.&nbsp;INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;is&nbsp;created&nbsp;in&nbsp;OS<br>
2.&nbsp;INPUT_EVENT_LATENCY_UI_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;reaches&nbsp;Chrome<br>
3.&nbsp;INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;reaches&nbsp;RenderWidget<br>
&nbsp;<br>
If&nbsp;the&nbsp;latency&nbsp;starts&nbsp;with&nbsp;a<br>
LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT&nbsp;component,&nbsp;then&nbsp;it&nbsp;is<br>
classified&nbsp;as&nbsp;a&nbsp;scroll&nbsp;update&nbsp;instead&nbsp;of&nbsp;a&nbsp;normal&nbsp;input&nbsp;latency&nbsp;measure.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;list&nbsp;sorted&nbsp;by&nbsp;increasing&nbsp;start&nbsp;time&nbsp;of&nbsp;latencies&nbsp;which&nbsp;are&nbsp;tuples&nbsp;of<br>
&nbsp;&nbsp;(input_event_name,&nbsp;latency_in_ms).</tt></dd></dl>
 <dl><dt><a name="-GetLatencyEvents"><strong>GetLatencyEvents</strong></a>(process, timeline_range)</dt><dd><tt>Get&nbsp;LatencyInfo&nbsp;trace&nbsp;events&nbsp;from&nbsp;the&nbsp;process's&nbsp;trace&nbsp;buffer&nbsp;that&nbsp;are<br>
&nbsp;&nbsp;&nbsp;within&nbsp;the&nbsp;timeline_range.<br>
&nbsp;<br>
Input&nbsp;events&nbsp;dump&nbsp;their&nbsp;LatencyInfo&nbsp;into&nbsp;trace&nbsp;buffer&nbsp;as&nbsp;async&nbsp;trace&nbsp;event<br>
of&nbsp;name&nbsp;starting&nbsp;with&nbsp;"InputLatency".&nbsp;Non-input&nbsp;events&nbsp;with&nbsp;name&nbsp;starting<br>
with&nbsp;"Latency".&nbsp;The&nbsp;trace&nbsp;event&nbsp;has&nbsp;a&nbsp;memeber&nbsp;'data'&nbsp;containing&nbsp;its&nbsp;latency<br>
history.</tt></dd></dl>
 <dl><dt><a name="-GetTimestampEventName"><strong>GetTimestampEventName</strong></a>(process)</dt><dd><tt>Returns&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;events&nbsp;used&nbsp;to&nbsp;count&nbsp;frame&nbsp;timestamps.</tt></dd></dl>
 <dl><dt><a name="-HasRenderingStats"><strong>HasRenderingStats</strong></a>(process)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;process&nbsp;contains&nbsp;at&nbsp;least&nbsp;one<br>
BenchmarkInstrumentation::*<a href="#RenderingStats">RenderingStats</a>&nbsp;event&nbsp;with&nbsp;a&nbsp;frame.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>APPROXIMATED_PIXEL_ERROR</strong> = 'approximated_pixel_percentages'<br>
<strong>APPROXIMATED_VISIBLE_CONTENT_DATA</strong> = 'approximated_visible_content_area'<br>
<strong>BEGIN_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT'<br>
<strong>BEGIN_SCROLL_UPDATE_COMP_NAME</strong> = 'LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT'<br>
<strong>CHECKERBOARDED_PIXEL_ERROR</strong> = 'checkerboarded_pixel_percentages'<br>
<strong>CHECKERBOARDED_VISIBLE_CONTENT_DATA</strong> = 'checkerboarded_visible_content_area'<br>
<strong>END_COMP_NAME</strong> = 'INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT'<br>
<strong>FORWARD_SCROLL_UPDATE_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT'<br>
<strong>GESTURE_SCROLL_UPDATE_EVENT_NAME</strong> = 'InputLatency::GestureScrollUpdate'<br>
<strong>MAIN_THREAD_SCROLL_UPDATE_EVENT_NAME</strong> = 'Latency::ScrollUpdate'<br>
<strong>ORIGINAL_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT'<br>
<strong>UI_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_UI_COMPONENT'<br>
<strong>VISIBLE_CONTENT_DATA</strong> = 'visible_content_area'</td></tr></table>
</body></html>